package com.abhinav.designPatterns.abstractfactory;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		GUIBuilder builder = new GUIBuilder();
		AbstractWidgetFactory widgetFactory = null;

		String OS = System.getProperty("os.name").toLowerCase();

		// check what platform we're on
		if (OS.indexOf("mac") >= 0) {
			widgetFactory = new MacOSXWidgetFactory();
		} else {
			widgetFactory = new MsWindowsWidgetFactory();
		}
		Window window = builder.buildWindow(widgetFactory);
		
		System.out.println(window);
	}

}
